package com.feng.seata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feng.seata.model.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface ProductMapper extends BaseMapper<Product> {

    @Update("update product_info set stock = stock - #{buyNum}")
    void minusStock(@Param("buyNum") Integer buyNum);
}
